<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="include/resources.jsp" %>
<title>创建文章——我的博客</title>
    <script type="text/javascript" src="/MyBlog/js/create.js"></script>

    <style type="text/css">
        div{
            width:100%;
        }
    </style>
</head>
<body>
	<div class="container-fluid">
		<%@include file="include/header.jsp"%>
	</div>
	<!--模态窗体-->
	<button id="findAllCategory" class="btn btn-danger" type="button" data-toggle="modal" data-target="#myModal">分类操作</button>
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button data-dismiss="modal" class="close" type="button"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
	          </div>
	          <div class="modal-body" id="categoryContent">
	            <h1>分类操作</h1>
	            <input type="text" id="cateogryInput"><button class="btn btn-success" id="addCategoryButton">添加分类</button>
	             <!--table-->
	             <table class="table">
						  <thead>
						     <th>头像</th>
						     <th>名字</th>
						     <th>HP</th>
						  </thead>
						  <tbody id="categoryTbody">
						  </tbody>
				 </table>
	             <!--table-->
	          </div>
	          <div class="modal-footer">
	          </div>
	        </div><!-- /.modal-content -->
	      </div><!-- /.modal-dialog -->
		</div>
		<!--模态窗体-->



	<form class="form-inline my-2 my-lg-0" style="margin-left: 500px;" >
	           <button class="btn btn-outline-success my-2 my-sm-0" type="submit">分类</button>
				    <button type="button" class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
				        请选择
				      <span class="caret"></span>         
				    </button>
				    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
				        <c:forEach  items="${list}"  var="category" varStatus="itmeStatus">
			                  <li>
						         <a href="javascript:void(0)" id="${category.id}">${category.name}</a>            
						      </li>			      
				      </c:forEach>
				    </ul>
				    <input value="" id="categoryId">
               <button class="btn btn-outline-success my-2 my-sm-0" type="submit">标题</button>
			   <input class="form-control mr-sm-2" type="text" placeholder="文章名。。。。" id="articleTitle">
    </form>
	<script id="editor" type="text/plain" style="width:800px;height:300px;margin: 0 auto;margin-top: 0px;"></script>
	<script type="text/javascript">

    var ue = UE.getEditor('editor');
</script>
<a href="#" class="btn btn-primary " style="margin-left: 900px;margin-top: 20px;" id="uploadArticle">上传文章</a>


</body>
</html>